package com.example.demo.entity.primary;

import javax.persistence.*;

/**
 * Created by dongjunpeng on 2017/12/4.
 */
@Entity
@Table(name = "vessel_container_error")
public class VesselContainerErrorEntity {
    private int containerErrorId;
    private String vesselVoyageNumber;
    private String containerNumber;
    private String containerErrorFeedback;
    private Boolean isHandled;
    private String remark;
    private String errorCode;

    @Id
    @Column(name = "container_error_id")
    public int getContainerErrorId() {
        return containerErrorId;
    }

    public void setContainerErrorId(int containerErrorId) {
        this.containerErrorId = containerErrorId;
    }

    @Basic
    @Column(name = "vessel_voyage_number")
    public String getVesselVoyageNumber() {
        return vesselVoyageNumber;
    }

    public void setVesselVoyageNumber(String vesselVoyageNumber) {
        this.vesselVoyageNumber = vesselVoyageNumber;
    }

    @Basic
    @Column(name = "container_number")
    public String getContainerNumber() {
        return containerNumber;
    }

    public void setContainerNumber(String containerNumber) {
        this.containerNumber = containerNumber;
    }

    @Basic
    @Column(name = "container_error_feedback")
    public String getContainerErrorFeedback() {
        return containerErrorFeedback;
    }

    public void setContainerErrorFeedback(String containerErrorFeedback) {
        this.containerErrorFeedback = containerErrorFeedback;
    }

    @Basic
    @Column(name = "is_handled")
    public Boolean getIsHandled() {
        return isHandled;
    }

    public void setIsHandled(Boolean isHandled) {
        this.isHandled = isHandled;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "error_code")
    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VesselContainerErrorEntity that = (VesselContainerErrorEntity) o;

        if (errorCode != null ? !errorCode.equals(that.errorCode) : that.errorCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return errorCode != null ? errorCode.hashCode() : 0;
    }
}
